package cn.johnyu.contoller;

import cn.johnyu.client.ProductClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
public class OrderController {
    @Autowired
    private ProductClient productClient;

    @GetMapping("/info")
    public Map<String,String> info(){
        Map<String,String> map=new HashMap<>();
        String info1 = productClient.info();
        map.put("product",info1);
        return map;
    }
}
